home *** CD-ROM | disk | FTP | other *** search
/ PD Collection CD 1 / PD Collection CD 1.iso / programer2 / euclidlib / h / function < prev    next >
Text File  |  1992-04-12  |  1KB  |  32 lines

  1. /**** function.h ****/
  2. /* Program to create a 3d graph of a function using Euclid */
  3. /* By Paul Field
  4.  * See !ReadMe file for distribution/modification restrictions
  5.  */
  6.  
  7. #ifndef __function_h
  8. #define __function_h
  9.  
  10. #include "euclid.h"
  11.  
  12. typedef struct graphdata
  13.  { double minx,maxx;            /* Range of x to plot graph */
  14.    double miny,maxy;            /* Range of y to plot graph */
  15.    unsigned int subdivisions;   /* Squares along edge of graph */
  16.    unsigned int realsize;       /* Graph is scaled so that it fits in a cube of */
  17.                                 /* 'realsize' (euclid coordinates) length sides */
  18.    double (*f)(double, double); /* The function that makes up the graph */
  19.    const char *name;            /* The name of the graph */
  20.    double scale;                /* This field is filled in by 'makegraph', it is */
  21.                                 /* the value that x,y and z values were multiplied */
  22.                                 /* by to make them fit in the 'realsize' cube */
  23.  }graphdata;
  24.  
  25.  
  26. os_error *function_makegraph(euclid_header *h, graphdata *g, euclid_mesh **mesh);
  27.  /* Takes the current euclid data structure 'h' and the details of the graph 'g'
  28.   * and sets *mesh to point to a mesh that represents the graph.
  29.   * If there is an error it is returned and '*mesh' is undefined.
  30.   */
  31. #endif
  32.